2000W / 48V LLC Battery-Charger  V1.00

Brightness and Color Control Unit (BCCU) driver for the XMC1 microcontroller family. More...

Collaboration diagram for BCCU:

Brightness and Color Control Unit (BCCU) driver for the XMC1 microcontroller family.

The Brightness and Color Control Unit (BCCU) is a dimming control peripheral for LED lighting applications. The BCCU module can be used to control multiple LED channels. Every channel generates one-bit sigma-delta bit stream with a user adjustable 12-bit average value. The dimming engine changes the brightness gradually (exponential curve) to appear natural to the human eye. It supports color control by adjusting the relative intensity of selected channels using a linear walk scheme for smooth color changes. It also supports high-power multi-channel LED lamps by optionally packing the bitstream. The optional packer which decreases the average rate of output switching by enforcing a defined on-time. The BCCU module generates two trigger signals to the ADC (BCCU_TRIGOUT0 and BCCU_TRIGOU1) to start conversions in a synchronized manner. The module can also be used as a multi-channel digital-analog converter with low-pass filters on the outputs. The BCCU module supports 3 independent dimming engines, 9 independent channels, Trap functions and 2 ADC triggering modes.

The driver is divided into global control (BCCU), channel control (BCCU_CH) and dimming control (BCCU_DIM).

BCCU features:

  1. Configuration structure XMC_BCCU_GLOBAL_CONFIG_t and initialization function XMC_BCCU_GlobalInit()
  2. Allows configuring of clock settings (Fast clock, Bit clock and Dimming clock). XMC_BCCU_SetFastClockPrescaler(),
  3. XMC_BCCU_SelectBitClock(), XMC_BCCU_SetDimClockPrescaler().
  4. Allows configuring global trigger settings. XMC_BCCU_ConfigGlobalTrigger()
  5. Allows enabling multiple channels together. XMC_BCCU_ConcurrentEnableChannels()
  6. Allows enabling single channel. XMC_BCCU_EnableChannel()
  7. Allows configuring global dimming level. XMC_BCCU_SetGlobalDimmingLevel()
  8. Starts linear walk for multiple channels together. XMC_BCCU_ConcurrentStartLinearWalk().
  9. Starts linear walk for single channel. XMC_BCCU_StartLinearWalk().
  10. Starts dimming for multiple dimming engines together. XMC_BCCU_ConcurrentStartDimming().
  11. Starts dimming for single dimming engine. XMC_BCCU_StartDimming().

BCCU_CH features:

  1. Configuration structure (XMC_BCCU_CH_t and initialization function XMC_BCCU_CH_Init()
  2. Allows selecting dimming engine. XMC_BCCU_CH_SelectDimEngine().
  3. Allows setting target channel intensity. XMC_BCCU_CH_SetTargetIntensity().
  4. Allows knowing the status of linear walk completion. XMC_BCCU_IsLinearWalkComplete()
  5. Allows setting flicker watchdog. XMC_BCCU_CH_EnableFlickerWatchdog().
  6. Allows configuring packer settings. XMC_BCCU_CH_EnablePacker(), XMC_BCCU_CH_SetPackerThreshold(), XMC_BCCU_CH_SetPackerOffCompare(), XMC_BCCU_CH_SetPackerOffCounte(), XMC_BCCU_CH_SetPackerOnCounter()
  7. Allows selecting dimming bypass. XMC_BCCU_CH_DisableDimmingBypass()

BCCU_DIM features:

  1. Configuration structure (XMC_BCCU_DIM_t and initialization function XMC_BCCU_DIM_Init()
  2. Allows setting target dimming engine intensity. XMC_BCCU_DIM_SetTargetDimmingLevel(). XMC_BCCU_DIM_SetTargetDimmingLevel
  3. Allows knowing the status of dimming completion. XMC_BCCU_IsDimmingFinished()
  4. Allows configuring dimming divider. XMC_BCCU_DIM_SetDimDivider()
  5. Allows configuring dimming curve. XMC_BCCU_DIM_ConfigDimCurve()

Recommended programming sequence:

  1. Set output passive and active levels using XMC_BCCU_ConcurrentSetOutputPassiveLevel() or XMC_BCCU_SetOutputPassiveLevel()
  2. Initializes global features using XMC_BCCU_GlobalInit()
  3. Initializes channel features using XMC_BCCU_CH_Init()
  4. Initializes dimming engine using XMC_BCCU_DIM_Init()
  5. Enable channels using XMC_BCCU_ConcurrentEnableChannels() or XMC_BCCU_EnableChannel()
  6. Enable dimming engines using XMC_BCCU_ConcurrentEnableDimmingEngine() or XMC_BCCU_EnableDimmingEngine()
  7. Configure channel linear walk prescaler using XMC_BCCU_CH_SetLinearWalkPrescaler()
  8. Configure dimming divider using XMC_BCCU_DIM_SetDimDivider()
  9. Set target intensities of channels using XMC_BCCU_CH_SetTargetIntensity()
  10. Set target dim levels of dimming engines using XMC_BCCU_DIM_SetTargetDimmingLevel()
  11. Start linear walk of the channels using XMC_BCCU_ConcurrentStartLinearWalk() or XMC_BCCU_StartLinearWalk()
  12. Start dimming of the dimming engines using XMC_BCCU_ConcurrentStartDimming() or XMC_BCCU_StartDimming()
  13. Check the status of linear walk completion using XMC_BCCU_IsLinearWalkComplete()
  14. Check the status of dimming completion XMC_BCCU_IsDimmingFinished()